import logging
import yagmail

def log_set():
    logging.basicConfig(level=logging.DEBUG,format="%(asctime)s----%(levelname)s----%(message)s",filename='log.txt',filemode='w+')

# def send_email(filename):
#     s = yagmail.SMTP(user="1441688225@qq.com", password="subvcobnwlujggee", host="smtp.qq.com")
#     s.send(to="1441688225@qq.com", subject="4.11zuoye", contents="请查看", attachments=filename)
def send_email(filename):
    s=yagmail.SMTP(user="1441688225@qq.com",password='subvcobnwlujggee',host='smtp.qq.com')
    s.send(to='1441688225@qq.com',subject='4.13作业',contents='请查看',attachments=filename)